//
//  WBBaseViewController.swift
//  weibo-swift
//
//  Created by carmne on 2019/1/3.
//  Copyright © 2019 lessismore. All rights reserved.
//

import UIKit

class WBBaseViewController: UIViewController {

    //访客视图信息
    var visitorInfoDict: [String: Any]?
    override func viewDidLoad() {
        super.viewDidLoad()
       
    setupUI()
        // Do any additional setup after loading the view.
    }
    
 private func setupUI(){
     view.backgroundColor=UIColor.cz_random();
    //view.backgroundColor = UIColor.white
    //取消自动缩放
    automaticallyAdjustsScrollViewInsets = false
    
    setUpNavigationBar()
    }
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
extension WBBaseViewController{
    
    
    private func setUpNavigationBar() {
        
        //设置navbar整个背景的渲染颜色
        navigationController?.navigationBar.barTintColor = UIColor.cz_random();
        //设置navbar的字体颜色
        navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor : UIColor.darkGray]
        //设置系统按钮的文字渲染颜色
        navigationController?.navigationBar.tintColor = UIColor.orange
        
        navigationController?.interactivePopGestureRecognizer?.delegate = self as? UIGestureRecognizerDelegate;
}

}
